Screensaver stuff....


[ Follow Ups ] [ Post Followup ] [ Björn's 3D-World - Developer's Board ]

Posted by Jari Jokivuori from 212.213.117.25 (212.213.117.25) on May 21, 1999 at 07:03:14:

In Reply to: Re: More about OpenGL (textures...) posted by Chris Lundie on May 21, 1999 at 06:30:43:

Did you use MS-screensaver library or did you all by youself??

What would be better way to syncronize display updating?

(Current way)
-------------------------
ScreenSaverProc()
{
switch ( message ) {

case WM_CREATE:
// get window dimensions
GetClientRect( hWnd, &rect );
Width = rect.right;
Height = rect.bottom;
// setup OpenGL
InitGL( hWnd, hDC, hRC );
// startup animation
Startup();
// begin animation
SetTimer( hWnd, TIMER, 10, NULL );
return 0;

case WM_DESTROY:
// stop animation
KillTimer( hWnd, TIMER );
// shutdown animation
Shutdown();
// shutdown OpenGL
CloseGL( hWnd, hDC, hRC );
return 0;

case WM_TIMER:
// animation callback
TheScreenSaverFunction(hDC);
return 0;

}
-----------------------------------

So, this all screen updating depends of timer interupt and windows message handling speed.

Other way may be just running display part of program and check messages time to time...
Uh, i am not confortable with windows programming..:-(



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Björn's 3D-World - Developer's Board ]